//
// Created by Semir on 2020/4/26.
//

#include <iostream>
#include <deque>
#include <string>
#include <map>
#include <cmath>

using namespace std;

int n, k;
long long x;


int findLayer(long long x) {
    if (x >= pow(2, 60)) {
        return -1;
    }
    int low = 1;
    int high = 60;
    while (low <= high) {
        int mid = (low + high) >> 1;
        if (x < pow(2, mid - 1)) {
            high = mid - 1;
        } else if (x >= pow(2, mid) - 1) {
            low = mid + 1;
        } else {
            return mid;
        }
    }
    return -1;
}

int main() {
    cout << findLayer(10) << endl;
    return 0;
}